﻿@model orienta.ViewModels.PersonaInfo
@{
    ViewBag.Title = "Confirmacion";
}
@{
    Layout = "~/Views/Shared/_LayoutPopUpPersona.cshtml";
    ViewBag.Title = "Registro Personas";
    var id = 0;
}
<script>
function aceptar() {
    var tipo = document.forms[0].tipo.value;
    var d = window.opener.document;
    if (tipo == "S") {
        d.getElementById("nNombreSolic").value = document.forms[0].sPrimerNombre.value;
        d.getElementById("nApePatSolic").value = document.forms[0].sApellidoPaterno.value;
        d.getElementById("nApeMatSolic").value = document.forms[0].sApellidoMaterno.value;
        d.getElementById("nIdiPaisSolic").value = document.forms[0].nIdePais.value;
        //d.getElementById("paisAfect").value = "PERU<73>";
        //d.getElementById("nIdiPaisAfect").value = "73";
        d.getElementById("nIdiTipoDocSolic").value = document.forms[0].nIdeTipoDoc.value;
        d.getElementById("nNumDocSolic").value = document.forms[0].sNumDoc.value;
        d.getElementById("nTipoSolicitante").value = document.forms[0].nIdeTipoPers.value;
        d.getElementById("nIdeSolic").value = document.forms[0].nIdePersona.value;
        
    } else {
        d.getElementById("nNombreAfect").value = document.forms[0].sPrimerNombre.value;
        d.getElementById("nApePatAfect").value = document.forms[0].sApellidoPaterno.value;
        d.getElementById("nApeMatAfect").value = document.forms[0].sApellidoMaterno.value;
        d.getElementById("nIdiPaisAfect").value = document.forms[0].nIdePais.value;
        //d.getElementById("paisAfect").value = "PERU<73>";
        d.getElementById("nIdiTipoDocAfect").value = document.forms[0].nIdeTipoDoc.value;
        d.getElementById("nNumDocAfect").value = document.forms[0].sNumDoc.value;
        d.getElementById("nIdeAfect").value = document.forms[0].nIdePersona.value;
    }
    window.close();
} 
</script>
<form id="form1">
<center>
    <div style="width: 98%;">
        <table class="tablaTituloOpciones_MIDIS" style="width: 100%; border" cellpadding="2"
            cellspacing="0" border="1">
            <tbody class="tituloBlanco_MIDIS">
                <tr>
                    <td align="center">
                        REGISTRO DE PERSONAS
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td>
                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                        <tr>
                            <td align="center" style="height: 50px;" valign="top">
                                <span class="letramensajes">Se Registro la persona Satisfactoriamente...</span>
                                <input type="hidden" id="tipo" name="tipo" value="@Request["tipo"]" />
                                @Html.HiddenFor(m => m.sPrimerNombre)
                                @Html.HiddenFor(m => m.sApellidoPaterno)
                                @Html.HiddenFor(m => m.sApellidoMaterno)
                                @Html.HiddenFor(m => m.nIdePais)
                                @Html.HiddenFor(m => m.nIdeGenero)
                                @Html.HiddenFor(m => m.nIdeTipoDoc)
                                @Html.HiddenFor(m => m.sNumDoc)
                                @Html.HiddenFor(m => m.nIdeTipoPers)
                                 @Html.HiddenFor(m => m.nIdePersona)
                                <br />
                                <input type="button" onclick="javascript:aceptar()" value="Aceptar">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <a href="Create">Registrar Nueva Persona</a>
                </td>
            </tr>
        </table>
    </div>
    </form>
</center>
